<template>
  <readonly-form :fields="dataFields" :data="data" />
</template>

<script>
import { reactive } from "vue";
import { handleFormEmptyData } from "@/tools/filters";

export default {
  props: {
    data: {
      type: Object,
      default: () => ({})
    }
  },
  setup() {
    const dataFields = reactive([
      {
        title: "基础信息",
        fields: [
          { span: 6, title: "学校名称", field: "schoolEnName" },
          { span: 6, title: "大学缩写", field: "schUniversityAbbreviation" },
          { span: 6, title: "性质", field: "schNature" },
          { span: 6, title: "类别", field: "schCategory" },
          { span: 6, title: "官方地址", field: "schOfficialWebsiteAddress" },
          { span: 6, title: "学制", field: "schSchoolSystem" },
          { span: 6, title: "星级", field: "schStar" },
          { span: 6, title: "所属国家", field: "schCountryName" },
          { span: 6, title: "省/州", field: "schProvinceName" },
          { span: 6, title: "城市", field: "schCity" },
          { span: 6, title: "街道", field: "schStreet" },
          { span: 6, title: "邮编", field: "schMailbox" },
          { span: 6, title: "学生人数", field: "schStuNumber" },
          {
            span: 6,
            title: "国际学生人数",
            field: "schInternationalStuNumber"
          },
          { span: 6, title: "排名", field: "schRanking" },
          { span: 6, title: "意向项目", field: "schIntendedProject" },
          { span: 6, title: "网课情况", field: "schOnlineYesno" },
          { span: 6, title: "国际生学费", field: "schTuition" },
          { span: 6, title: "开始合作时间", field: "schStartCooperationTime" },
          { span: 6, title: "合作结束时间", field: "schEndCooperationTime" },
          { span: 6, title: "成立时间", field: "schEstablishmentTime" },
          {
            span: 6,
            title: "学校资质",
            field: "qualification"
          },
          // {
          //   span: 24,
          //   title: "跟进情况",
          //   field: "schCompetitorYesno"
          // },
          {
            span: 24,
            title: "是否与竞争对手合作",
            field: "schCompetitorYesno"
          },
          {
            span: 24,
            title: "合作学费情况",
            field: "schTuitionFees",
            labelCol: { span: 6 }
          },
          // {
          //   span: 24,
          //   title: "国内合作高校",
          //   field: "schDomesticCooperativeUniversities"
          // },
          { span: 24, title: "开设专业", field: "schOpenMajor" },
          {
            span: 24,
            title: "结算条件",
            field: "schExpenseSettlementConditions"
          },
          { span: 24, title: "课程目录", field: "schCourseCatalog" },
          { span: 24, title: "学费信息链接", field: "tuitionInformationLink" },
          { span: 24, title: "校历链接", field: "calendarLink" },
          { span: 24, title: "市场情况", field: "schMarketDetails" }
        ]
      },
      {
        title: "填写转学分信息",
        fields: [
          { span: 12, title: "可上项目类型", field: "schProjectType" },
          {
            span: 12,
            title: "项目类型备注",
            field: "schProjectTypeBranck"
          },
          { span: 24, title: "转学分政策", field: "schCreditTransferPolicy" },
          { span: 24, title: "转学分成绩最低要求", field: "schPerformanceRequirements" },
          { span: 12, title: "是否转入GPA", field: "isGpa" },
          { span: 12, title: "转GPA备注", field: "schGpaRequirements" },
          { span: 24, title: "选课注意事项", field: "schXkAttention" },
          { span: 12, title: "课程对应记录链接", field: "schKcLink" },
          { span: 24, title: "课程认证流程", field: "schRzlc" },
          { span: 12, title: "认证截止日期", field: "schEndTime" },
          { span: 24, title: "课后转学分注意事项", field: "schKhAttention" },
          { span: 24, title: "本校毕业要求", field: "biYaoQi" },
          { span: 24, title: "其他", field: "schRemarks" },
        ]
      },
      {
        title: "纸质寄送信息",
        fields: "paperList",
        type: "array",
        childFields: [
          { span: 4, title: "收件人", field: "schAddressee" },
          { span: 5, title: "联系电话", field: "schPhone" },
          { span: 5, title: "邮编", field: "schMailbox" },
          { span: 10, title: "地址", field: "schSendAddress" }
        ]
      },
      {
        title: "电子寄送信息",
        fields: "electronList",
        type: "array",
        childFields: [
          { span: 4, title: "收件人", field: "schAddressee" },
          { span: 5, title: "收件邮箱", field: "schMailbox" },
        ]
      },
      {
        title: "邮箱后缀",
        fields: [{ span: 24, title: "邮箱后缀", field: "schMailboxSuffix" }]
      },
      // {
      //   title: "历年calendar",
      //   fields: "schCalendarYearList",
      //   type: "array",
      //   childFields: [
      //     { span: 4, title: "学期", field: "schCySemester" },
      //     { span: 5, title: "开课时间", field: "schCyBegindate" },
      //     { span: 5, title: "考试时间", field: "schCyExaminationdate" },
      //     { span: 10, title: "放假时间", field: "schHolidaydate" }
      //   ]
      // },
      {
        title: "附件信息",
        fields: [
          { span: 24, title: "Logo", field: "logo" },
          { span: 24, title: "合同", field: "contract" },
          { span: 24, title: "其他附件", field: "other" },
          { span: 24, title: "课程大纲页尾", field: "courseHeader" },
          { span: 24, title: "课程大纲页脚", field: "courseFooter" }
        ]
      }
    ]);

    return {
      dataFields,
      handleFormEmptyData
    };
  }
};
</script>
